/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package impss;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author Mikehood
 */
@Entity
@Table(name = "pf")
@NamedQueries({@NamedQuery(name = "Pf.findAll", query = "SELECT p FROM Pf p"), @NamedQuery(name = "Pf.findByPfID", query = "SELECT p FROM Pf p WHERE p.pfID = :pfID"), @NamedQuery(name = "Pf.findByPfName", query = "SELECT p FROM Pf p WHERE p.pfName = :pfName"), @NamedQuery(name = "Pf.findByPfTime", query = "SELECT p FROM Pf p WHERE p.pfTime = :pfTime"), @NamedQuery(name = "Pf.findByPfPrice", query = "SELECT p FROM Pf p WHERE p.pfPrice = :pfPrice")})
public class Pf implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "pfID")
    private Integer pfID;
    @Column(name = "pfName")
    private String pfName;
    @Column(name = "pfTime")
    private Integer pfTime;
    @Column(name = "pfPrice")
    private Integer pfPrice;
    @OneToMany(mappedBy = "pfID")
    private Collection<Produce> produceCollection;

    public Pf() {
    }

    public Pf(Integer pfID) {
        this.pfID = pfID;
    }

    public Integer getPfID() {
        return pfID;
    }

    public void setPfID(Integer pfID) {
        this.pfID = pfID;
    }

    public String getPfName() {
        return pfName;
    }

    public void setPfName(String pfName) {
        this.pfName = pfName;
    }

    public Integer getPfTime() {
        return pfTime;
    }

    public void setPfTime(Integer pfTime) {
        this.pfTime = pfTime;
    }

    public Integer getPfPrice() {
        return pfPrice;
    }

    public void setPfPrice(Integer pfPrice) {
        this.pfPrice = pfPrice;
    }

    public Collection<Produce> getProduceCollection() {
        return produceCollection;
    }

    public void setProduceCollection(Collection<Produce> produceCollection) {
        this.produceCollection = produceCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pfID != null ? pfID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pf)) {
            return false;
        }
        Pf other = (Pf) object;
        if ((this.pfID == null && other.pfID != null) || (this.pfID != null && !this.pfID.equals(other.pfID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "impss.Pf[pfID=" + pfID + "]";
    }

}
